"""
和图片路径相关的模块
"""
from os import path

# 图片资源所在根目录的绝对路径
IMG_ROOT_DIR_PATH = path.join(path.dirname(__file__), '../resources/imgs')


def gen_img_path(img_relative_path: str) -> str:
    """
    根据图片相对于图片资源所在根目录的相对路径生成图片资源的绝对路径
    :param img_relative_path: 图片相对于图片资源所在根目录的相对路径
    :return: 图片资源的绝对路径
    """
    return path.join(IMG_ROOT_DIR_PATH, img_relative_path)


# 图片资源的绝对路径
# "开始游戏"界面
START_GAME_BG_PATH = gen_img_path('./start_game/bg.jpg')
START_GAME_LOGO_PATH = gen_img_path('./start_game/logo.png')
START_GAME_BTN_BAR_DIRT_PATH = gen_img_path('./start_game/btn_bar_dirt.png')
START_GAME_BTN_BAR_GRASS_PATH = gen_img_path('./start_game/btn_bar_grass.png')
START_GAME_BTN_BAR_GRASS_ROLL_PATH = gen_img_path('./start_game/btn_bar_grass_roll.png')
# "主菜单"界面
MAIN_MENU_BG_PATH = gen_img_path('./main_menu/bg.png')
MAIN_MENU_ITEM_START_ADVENTURE_PATH = gen_img_path('./main_menu/menu_item_start_adventure.png')
MAIN_MENU_ITEM_START_ADVENTURE_ACTIVE_PATH = gen_img_path('./main_menu/menu_item_start_adventure_active.png')
# 游戏地图
MAP_BG_GRASS_FULL_PATH = gen_img_path('./maps/bg_grass_full.jpg')
